import { getPageInfo } from '@/api/information/warehouse'
const state = {
  FormData: {}
}
const mutations = {
  getWarehouseData(state, data) {
    state.FormData = data
  }
}
const actions = {
  async getWarehouseDetails(context) {
    // 获取数据
    const { records, current, size, total } = await getPageInfo()
    const data = {
      dataList: records,
      total: +total,
      size: +size,
      current: +current
    }
    context.commit('getWarehouseData', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

